Release 10.1A: OpenEdge Development:
.NET Open Clients


Adding parameters using data type-specific methods

You can set each parameter using one of the methods on the Progress.Open4GL.Proxy.ParamArray class that is specified for the corresponding Progress 4GL data type. Data types that are mapped to value types in .NET (System.Boolean, System.Decimal, System.Int32, System.Int64, and System.DateTime) have two sets of methods:

Methods to add arrays of each data type are also provided.

General syntax for data type-specific add parameter methods

The general syntax of these methods is as follows:

Syntax
public void AddProgressType (int position, DataType value, int mode, 
                     [ int extentValue | MetaType metaData ]) 
            throws Open4GLException 

ProgressType

Indicates the Progress 4GL data type of the parameter, such as Decimal in AddDecimal(), for adding a parameter of data type DECIMAL.

position

Specifies a 0-based index indicating the parameter position.

DataType

Specifies the .NET data type of the parameter, for example, Decimal, Progress.Open4GL.DecimalHolder, Decimal[], or Progress.Open4GL.DecimalHolder[].

value

Specifies a variable that contains the value of the parameter, or null for an OUTPUT parameter.

mode

Specifies the 4GL mode (passing direction) of the parameter. This can be one of the following constant values:

extentValue

Specifies the extent of an array for methods that add an array parameter (where ProgressType is appended with Array, as in AddDecimalArray()).

MetaType

Specifies one of the following classes for methods that add a temp-table or ProDataSet parameter:

metaData

Specifies an instance of MetaType. When mode is ParamArrayMode.OUTPUT and ProgressType is DatasetHandle or TableHandle (passing a dynamic ProDataSet or temp-table parameter), you can set this parameter to null.

Syntax summaries of all data type-specific add parameter methods

The following sections list syntax summaries for all of the data type-specific methods for adding parameters to a ParamArray object:

CHARACTER

These are the data type-specific methods for adding a 4GL CHARACTER parameter:

Syntax
public void AddCharacter (int position, string value, int mode) 
public void AddCharacterArray (int position, string[] value, int mode,  
                               int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

COM-HANDLE

These are the data type-specific methods for adding a 4GL COM-HANDLE parameter:

Syntax
public void AddCOMHandle (int position,  
                          Progress.Open4GL.COMHandle value,  
                          int mode) 
public void AddCOMHandleArray (int position,  
                               Progress.Open4GL.COMHandle[] value,  
                               int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

DATASET and DATASET-HANDLE

These are the data type-specific methods for adding a 4GL ProDataSet (DATASET or DATASET-HANDLE) parameter:

Syntax
public void AddDataset(int position, DataSet value, int mode,  
                       ProDataSetMetaData metaData) 
public void AddDatasetHandle(int position, DataSet value, int mode, 
                             ProDataSetMetaData metaData) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

DATE

These are the data type-specific methods for adding a 4GL DATE parameter:

Syntax
public void AddDate (int position, DateTime value,  
                     int mode) 
public void AddDate (int position, Progress.Open4GL.DateHolder value,  
                     int mode) 
public void AddDateArray (int position,  
                          DateTime[] value,  
                          int mode, int extentValue) 
public void AddDateArray (int position,  
                          Progress.Open4GL.DateHolder[] value,  
                          int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

DATETIME

These are the data type-specific methods for adding a 4GL DATETIME parameter:

Syntax
public void AddDatetime (int position, DateTime value,  
                         int mode) 
public void AddDatetime (int position, Progress.Open4GL.DateHolder value,  
                         int mode) 
public void AddDatetimeArray (int position,  
                              DateTime[] value,  
                              int mode, int extentValue) 
public void AddDatetimeArray (int position,  
                              Progress.Open4GL.DateHolder[] value,  
                              int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

DATETIME-TZ

These are the data type-specific methods for adding a 4GL DATETIME-TZ parameter:

Syntax
public void AddDatetimeTZ (int position, DateTime value,  
                           int mode) 
public void AddDatetimeTZ (int position, Progress.Open4GL.DateHolder value, 
                           int mode) 
public void AddDatetimeTZArray (int position,  
                                DateTime[] value,  
                                int mode, int extentValue) 
public void AddDatetimeTZArray (int position,  
                                Progress.Open4GL.DateHolder[] value,  
                                int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

DECIMAL

These are the data type-specific methods for adding a 4GL DECIMAL parameter:

Syntax
public void AddDecimal (int position, Decimal value,  
                        int mode) 
public void AddDecimal (int position, Progress.Open4GL.DecimalHolder value, 
                        int mode) 
public void AddDecimalArray (int position,  
                             Decimal[] value,  
                             int mode, int extentValue) 
public void AddDecimalArray (int position,  
                             Progress.Open4GL.DecimalHolder[] value,  
                             int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

HANDLE

These are the data type-specific methods for adding a 4GL HANDLE parameter:

Syntax
public void AddHandle (int position, Progress.Open4GL.Handle value,  
                       int mode) 
public void AddHandleArray (int position, Progress.Open4GL.Handle[] value, 
                            int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

INTEGER

These are the data type-specific methods for adding a 4GL INTEGER parameter:

Syntax
public void AddInteger (int position, int value,  
                        int mode) 
public void AddInteger (int position, Progress.Open4GL.IntHolder value,  
                        int mode) 
public void AddIntegerArray (int position,  
                             int[] value,  
                             int mode, int extentValue) 
public void AddIntegerArray (int position,  
                             Progress.Open4GL.IntHolder[] value,  
                             int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

LOGICAL

These are the data type-specific methods for adding a 4GL LOGICAL parameter:

Syntax
public void AddLogical (int position, Boolean value,  
                        int mode) 
public void AddLogical (int position, Progress.Open4GL.BooleanHolder value, 
                        int mode) 
public void AddLogicalArray (int position,  
                             Boolean[] value,  
                             int mode, int extentValue) 
public void AddLogicalArray (int position,  
                             Progress.Open4GL.BooleanHolder[] value,  
                             int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

LONGCHAR

These are the data type-specific methods for adding a 4GL LONGCHAR parameter:

Syntax
public void AddLongChar(int position, string value,  
                        int mode) 
public void AddLongCharArray (int position, string[] value, int mode,  
                              int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

MEMPTR

These are the data type-specific methods for adding a 4GL MEMPTR parameter:

Syntax
public void AddMemptr (int position, Progress.Open4GL.Memptr value,  
                       int mode) 
public void AddMemptrArray (int position, Progress.Open4GL.Memptr[] value, 
                            int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

RAW

These are the data type-specific methods for adding a 4GL RAW parameter:

Syntax
public void AddRaw (int position, Byte[] value, int mode) 
public void AddRawArray (int position, Byte[][] value, int mode,  
                         int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

RECID

These are the data type-specific methods for adding a 4GL RECID parameter:

Syntax
public void  AddRecid (int position, Int64 value,  
                       int mode) 
public void AddRecid (int position, Progress.Open4GL.LongHolder value,  
                      int mode) 
public void AddRecidArray (int position, Int64[] value,  
                           int mode, int extentValue) 
public void AddRecidArray (int position, Progress.Open4GL.LongHolder[] value, 
                           int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

ROWID

These are the data type-specific methods for adding a 4GL ROWID parameter:

Syntax
public void AddRowid (int position, Progress.Open4GL.Rowid value,  
                      int mode) 
public void AddRowidArray (int position, Progress.Open4GL.Rowid[] value,  
                           int mode, int extentValue) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.

TABLE and TABLE-HANDLE

These are the data type-specific methods for adding a 4GL temp-table (TABLE or TABLE-HANDLE) parameter:

Syntax
public void AddTable (int position, DataTable value, int mode, 
                      TempTableMetaData metaData) 
public void AddTableHandle (int position, DataTable value, int mode, 
                            TempTableMetaData metaData) 

For information on the parameters to these methods, see the "General syntax for data type-specific add parameter methods" section.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095